if (fnt->CreateFont(lf.lfHeight,0,0,0,FW_DONTCARE,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Fixedsys")) {
int i;
for (i=0;i<NStatsBuffer; i++) {
element[0][i]->SetFont(fnt,true);
element[1][i]->SetFont(fnt,true);
}
}
}
}
*/
SetIcon(httrack_icon,false);
SetIcon(httrack_icon,true);
if (choixdeb[0]=='!')
Oniplog(0); // ouvrir log
// Lancer timer!
StartTimer();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void Cinprogress::StartTimer() {
if (!timer) {
timer=SetTimer(WM_TIMER,HTS_SLEEP_WIN,NULL);
}
}
void Cinprogress::StopTimer() {
if (timer) {
KillTimer(timer);
timer=0;
}
}
UINT AffLog( LPVOID pP ) {
Cinprogress* inp = (Cinprogress*) pP;
if (inp != NULL) {
inp->form.m_iplog=(CString) "No log report";
inp->form.DoModal();
inp->BackAffLog = NULL;
}
return 0; // thread completed successfully
}
// log pour fichiers d'erreur et de log
void Cinprogress::OniplogLog() {
Oniplog(0);
}
void Cinprogress::OniplogErr() {
Oniplog(1);
}
void Cinprogress::Oniplog(int mode) {
if (!BackAffLog) { // pas encore lancΘ
strcpy(pathlog,dialog0->GetPath());
if (strlen(pathlog)>0)
if ((pathlog[strlen(pathlog)-1]!='/') && (pathlog[strlen(pathlog)-1]!='\\'))
strcat(pathlog,"/");
// fichier log existe ou on est tΘlΘcommandΘ par un !
if ( (fexist(fconcat(pathlog,"hts-err.txt"))) || (fexist(fconcat(pathlog,"hts-log.txt"))) || (choixdeb[0]=='!') ) {
if (mode)
form.type_log=0;
else
form.type_log=1;
strcpy(form.pathlog,pathlog);
BackAffLog = AfxBeginThread(AffLog,this);
} else {
char s[1024];
sprintf(s,LANG(LANG_H2 /*"No log files in %s!","Aucun fichier d'audit dans %s!"*/),pathlog);
AfxMessageBox(s,MB_OK+MB_ICONEXCLAMATION);
}
}
}
void Cinprogress::OnViewTransfers()
{
StatsBuffer_info(0);
}
void Cinprogress::OnPause()
{
int m;
if (!hts_setpause(-1))
m=AfxMessageBox(LANG(LANG_H3 /*"Pause Transfer?","Placer le transfert sur pause?"*/),MB_OKCANCEL+MB_ICONQUESTION);